{% extends ../base.html %}

{% block body %}

<div class="col-md-12">&nbsp;</div>

<form method="POST">
<table class="table col-md-12">

    <tr>
        <th>编号</th>
        <th>任务URL</th>
        <th>执行间隔</th>
        <th>操作</th>
    </tr>
    {% set index = -1 %}
    {% for index, name in enumerate(sorted(task_dict)) %}
    {% set task = task_dict[name] %}
    <tr>
        <td>{{index+1}}</td>
        <td>{{task.url}}</td>
        <td>{{task.interval}}</td>
        <td><a href="/system/crontab?delurl={{task.url}}">删除</a></td>
    </tr>
    {% end %}

    <tr>
        <td>{{index+2}}</td>
        <td><input type="text" name="url"></td>
        <td><input type="text" name="interval"></td>
        <td><input type="submit" value="添加"></td>
    </tr>
</table>
</form>

{% end %}